package com.tx.object.test6;

public class User {
    //Javabean类
    //1.类名见名知意；2.成员变量使用private修饰；3提供至少两个构造方法
    // （无参构造方法，带全部参数的构造方法）；4.提供每一个成员变量对应的
    // setXXX（）/getXXX（），如果还有其他行为也要写上

    private String usersname;
    private String password;
    private String gender;
    private String emails;
    private int age;
    public User(){
    }
    public  User(String usersname, String password, String gender,String emails,int age){
        this.usersname=usersname;
        this.age=age;
        this.gender=gender;
        this.emails=emails;
        this.password=password;
    }
    public void setUsersname(String usersname){
        this.usersname=usersname;
    }
    public String getUsersname(){
        return usersname;
    }

    public static void main(String[] args) {
        User u=new User("zhangsan","awvce","femal","qsqqd230",19);
//要填完才可以得到全部参数的构造方法
        u.getUsersname();
        System.out.println(u.getUsersname());
    }

}
